{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<svg height=\"32\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"32\" data-view-component=\"true\" class=\"octicon octicon-mark-github v-align-middle\">\n",
    "    <path d=\"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z\"></path>\n",
    "</svg> \n",
    "   \n",
    "# Git 操作入门\n",
    "-------------------------------"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1. 用Git Clone建立本地库\n",
    "+ 语法：git clone 远程地址： 建立目录并建立本地仓库结构\n",
    "+ git clone https://gitee.com/best_tea/python2023.git"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. 用Git init建立本地仓库结构  \n",
    "\n",
    "+ 1 设置全局参数   \n",
    "  - Git config --global  user.name <\"best_tea\">\n",
    "  - Git config --global  user.email <\"best-tea@163.com\">   \n",
    "\n",
    "\n",
    "+ 2 初始化仓库  \n",
    "    - git init 目录名 :**一般是用云端仓库名做目录**\n",
    "    - Git init  < Python2023 >    \n",
    "    建立一个本地目录，并建立git结构     \n",
    "    <img src=./git%E4%BB%93%E5%BA%93%E5%90%8D.jpg width=40%>   \n",
    "    \n",
    "    + 2.1 cd 目录名    \n",
    "    + 2.2 git add .\n",
    "    + 2.3 git commit    \n",
    "+ 或者\n",
    "    - md python2023\n",
    "    - cd python2023\n",
    "    - git init\n",
    "    - git add .\n",
    "    - git commit\n",
    "\n",
    "+ 3 建立远端连接  \n",
    "    - git remote add <别名 > < 云端仓库地址 >\n",
    "    - git remote add origin https://gitee.com/best_tea/Python2023.git\n",
    "\n",
    "\n",
    "+ 4 比较本地库和远端库，拉回远端结构    \n",
    "    - git fetch origin master   \n",
    "\n",
    "\n",
    "+ 5 把远端库拉回本地  \n",
    "    + git pull -u origin master"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Git 使用说明"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
